<?php
include "../inc/db.php";
$sql="SELECT DATE_ADD(now(),INTERVAL (select * from tb_expired) DAY), now();";
$hasil=mysql_query($sql);
$kolom=mysql_fetch_array($hasil);

$sql="select * from tb_site where tgl_habis_kontrak between '$kolom[1]' and '$kolom[0]'";
$hasil=mysql_query($sql);
$count=mysql_num_rows($hasil);
?>

Total Site : <?php echo $count; ?>
<br />

<?php
while($kolom=mysql_fetch_array($hasil)){
?>
    <div style="width:200px;border-bottom: 1px solid #CCCCCC;padding:4px 0 4px 15px;">
    <a href="viewSite.php?id_site=<?php echo $kolom[0]; ?>" target="_blank">Site Name : <?php echo $kolom[1]; ?></a>
    <br />
    </div>
<?php
}
?>
<br />
